package com.xinqi.modules.sys.log.controller.admin;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.sys.log.dto.req.AsyncLogQueryDTO;
import com.xinqi.modules.sys.log.dto.rsp.AsyncLogResultDTO;
import com.xinqi.modules.sys.log.service.AsyncLogService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Admin-用户操作日志
 *
 * @version V1.0
 * @Title:
 * @ClassName: com.xinqi.modules.sys.log.controller.admin.OperatorLogAdminController.java
 * @Description:
 * @Copyright 星齐科技（云南）有限公司 - Powered By 技术部
 * @author: yyzhen
 * @date: 2023/8/23 13:59
 */
@RestController
@RequestMapping("/admin/async-log")
@RequiredArgsConstructor
public class AsyncLogAdminController {
    private final AsyncLogService asyncLogService;

    @Operation(summary = "用户操作日志-分页")
    @GetMapping("/page")
    public R<PageInfo<AsyncLogResultDTO>> page(@ParameterObject AsyncLogQueryDTO dto) {
        return R.data(asyncLogService.page(dto, dto));
    }

}
